package com.util.cdb.controller;

import com.util.cdb.bean.Result;
import com.util.cdb.bean.vo.dbinfo.DbInfoCreateVO;
import com.util.cdb.service.DbInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 数据源管理
 * @author: fengfazheng
 * @create: 2022-01-02 22:37
 **/
@RestController
@RequestMapping("/dbInfo")
@Api(value = "/dbInfo", tags = "数据源管理")
public class DbInfoContrller {
    @Autowired
    private DbInfoService dbInfoService;

    @PostMapping("/create")
    @ApiOperation(value = "新增数据源", httpMethod = "POST", notes = "新增数据源")
    public Result create(@RequestBody DbInfoCreateVO dbInfoCreateVO) {
        dbInfoService.createDbInfo(dbInfoCreateVO);
        return Result.resultOk();
    }
}
